//------------------------------------------
//- Includes all head files and functions. 
//------------------------------------------
// include ARM_core, SPI, Timers, Uart, RTC and Watchdog's type define.
#include "define.h"
//---------------------------------------
//- Example for read and write operation. 
//---------------------------------------
//--- set a bit to 1. 
// GPIO->gpio_p00_config |= gpio_p00_config_p00_pu_bit;
//
//--- set a bit to 0. 
// GPIO->gpio_p00_config &= ~gpio_p00_config_p00_pu_bit;
//
//--- set a bus to another value.
// regVal =  GPIO->gpio_p00_config;
// regVal &=  ~(gpio_p00_config_p00_pid_mask << gpio_p00_config_p00_pid_shift);
// GPIO->gpio_p00_config |= (0x6 << gpio_p00_config_p00_pid_shift);

void system_reset();

void switch_to_50m();

void switch_to_plli();

void config_uart0_pad();

void config_i2c0_pad();

void config_i2c1_pad();

void mcu_idle();

void mcu_sleep();

void config_spi0_master_pad();

void config_spi0_slave_pad();

void config_spi1_master_pad();

void config_spi1_slave_pad();

//-----------------------------------------------
//--- delay in us. This is only valid in ASIC simulation. 
//-----------------------------------------------
void delay_us_rtl(int delay_time);

void config_p30_gpio_out_high();

void config_p29_gpio_out_high();

void config_p30_gpio_out_low();

void config_p29_gpio_out_low();

void config_sim_end_with_pass();

void config_sim_end_with_fail();


